<!-- 变更记录 -->
<template>
  <PageHeaderNew :title="title" :breadCrumb="breadCrumb" :showBack="true">
  </PageHeaderNew>

  <div class="container">
    <a-space style="margin-bottom;: 20px">
      <a-range-picker
        @change="onChange"
        @select="onSelect"
        style="width: 254px; margin-bottom: 20px"
        showTime
      />
    </a-space>
    <TableTurn :tableData="getTableData" :args="args">
      <a-table-column :width="80">
        <template #title> 序号 </template>
        <template #cell="{ rowIndex }">
          {{ rowIndex + 1 }}
        </template>
      </a-table-column>
      <a-table-column
        :width="200"
        title="操作时间"
        data-index="problem"
      ></a-table-column>
      <a-table-column
        :width="200"
        title="操作人"
        data-index="problem"
      ></a-table-column>
      <a-table-column
        :width="200"
        title="操作模块"
        data-index="problem"
      ></a-table-column>
      <a-table-column
        :width="100"
        title="操作类型"
        data-index="problem"
      ></a-table-column>
      <a-table-column
        :width="200"
        title="操作内容"
        data-index="problem"
      ></a-table-column>
      <a-table-column
        :width="100"
        title="操作结果"
        data-index="problem"
      ></a-table-column>
      <!-- <a-table-column title="操作" :width="200" fixed="right">
        <template #cell="{ record }">
          <a-tooltip content="历史详情">
            <IconFont
              type="icon-details-def"
              :size="26"
              :style="{
                marginRight: '10px',
                cursor: 'pointer'
              }"
              @click="goDetail(record)"
            />
          </a-tooltip>
          <a-tooltip content="删除" position="left">
            <a-popconfirm
              content="是否确认删除该条数据?"
              @ok="remove(record.id)"
            >
              <IconFont
                type="icon-delete"
                :size="26"
                :style="{
                  marginRight: '10px',
                  cursor: 'pointer'
                }"
              />
            </a-popconfirm>
          </a-tooltip>
        </template>
      </a-table-column> -->
    </TableTurn>
  </div>
</template>

<script lang="ts" setup>
const router = useRouter();

const title = '变更记录';

const breadCrumb: string[] = ['组织', '基础设置', '组织机构列表', '变更记录'];

// 表格配置
const args = reactive({
  rowSelection: {
    type: 'checkbox',
    showCheckedAll: true,
    onlyCurrent: false
  }
});

// 获取表格数据
const getTableData = async (pageData: any) => {
  try {
    //
  } catch (error: unknown) {
    console.log(error);
  }
};

const goDetail = (id: number) => {
  //
};

const remove = async (id: number) => {
  try {
    //
  } catch (error: unknown) {
    console.log(error);
  }
};
</script>

<style lang="less" scoped>
.container {
  padding: 10px 20px;
}
</style>
